b2bsoft-ux
goodsMovement [IF-008a]
This operation creates a adjust product stock (goods movement) entity.
URL
https://[localhost]:[port]/b2bsoft-ux/v1/{businessId}/goodsMovement
URL PARAMS
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, PR, CR etc.) identifying the business unit. | Y |
Header
name | value | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. Minimum characters: 5 | Y |
client_secret | string | Password associated with the client_id. Minimum characters: 5 | Y |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API request | N |
cURL Request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/b2bsoft-ux/b2bsoft-ux/v1/PR/goodsMovement' \
--header 'client_id: abcde' \
--header 'client_secret: 12345' \
--header 'Content-Type: application/json' \
--data '{
"header": {
"postingDate": "20250312",
"docDate": "20250312",
"freeText": "LCPR2.0 API TEST TP",
"action": "goodsMovementB2Bsoft"
},
"goodsMovementsItems": [
{
"SKU": "104065",
"storeId": "13PR",
"location": "0002",
"movementType": "305",
"entryQuantity": 1.0,
"sequenceNo": "0001"
}
],
"goodsMovementsSerials": [
{
"sequenceNo": "0001",
"serialNo": "358907953084070"
}
]
}'
Each of the request parameters is detailed.
Name | Type | Description | Required |
---|---|---|---|
header | object | Consists the header details of the stock | Y |
header.postingDate | String | Goods movement posting date | Y |
header.docDate | String | Goods movement documented / requested date | Y |
header.freeText | String | Description of the request | N |
header.action | String | Holds the information from where the request is coming from | Y |
header.GMCode | String | Holds he information module code in SAP system | Y |
header.docNumber | String | Number of the document | N |
goodsMovementsItems | Array | Consists of product and stock details | Y |
goodsMovementsItems.SKU | String | Unique identifier of the material/product | Y |
goodsMovementsItems.storeId | String | Location id to indicate Retails/Returns | Y |
goodsMovementsItems.location | String | Storage Location | N |
goodsMovementsItems.movementType | String | Goods movement code | Y |
goodsMovementsItems.entryQuantity | Number | Quantity of the goods/material/product | Y |
goodsMovementsSerials | Array | Holds Goods Serial/Sequence number details | N |
goodsMovementsSerials.serialNo | String | Serial Number of the stock item | N |
goodsMovementsSerials.sequenceNo | String | Stock sequence number | N |
Response
{
"matDocYear":"2022",
"matDoc": "4900001465"
}
Definitions
Each of the request parameters is detailed.
name | value | description | required |
---|---|---|---|
matDocYear | string | Document created year | Y |
matDoc | string | Reference number of the goods movement | Y |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors": [
{
"code": 400,
"message": "VALIDATION:MISMATCH",
"description": "Invalid Posting Date, it should be in yyyymmdd format"
}
]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource."
}]
}
[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "The server could not find the requested resource.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method DELETE not allowed for : /{businessId}/goodsMovement"
}]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "Internal Error",
"description": "The request failed due to an internal error"
}]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation POST /goodsMovement for Business Id: xxxx not implemented"
}]
}